<?php
namespace Admin\Controller;
use Think\Controller;
 
/**
 * 组别管理控制类
 * @author CHL
 *
 */
class GroupController extends  CommonController{
	/**

	 * 获取组别列表
	 * @author CHL
	 */
	public function getGroup(){
		$Group=D('Group');
		$data=$Group->getAllGroup();
		return $data;
	}

	/**
	 * 新增组别
	 *
	 */
	public function addGroup(){
		$post_data=I('post.');
		$Group=D('Group');
		$data = $Group->addGroup($post_data);
		$this->ajaxReturn($data);
	}


	/**
	 * 编辑组别
	 */
	public function updateGroup(){
		$post_data=I('post.');
		$Group=D('Group');
		$flag = $Group->updateGroup($post_data,$post_data['type']);
	}

	/**
	 * 删除组别
	 */
	public function deleteGroup(){
		$post_data=I('post.');
		$Group=D('Group');
		$flag = $Group->deleteGroup($post_data);
	}



}